import path from 'path';
import { findUp } from './utils/findUp';

const configFileName = 'qarel.config.js';

const pathToPackageJson = findUp('package.json');
const pathToConfig = path.join(path.dirname(pathToPackageJson), configFileName);

const configFile = require(pathToConfig);

interface Config {
  users: {
    username: string;
  }[];
  commonPassword: string;
  loginUrl: string;
}

export const config: Config = configFile;
